package com.eco.fanliapp.entity;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.io.Serializable;

/**
 * Created by mars on 6/29/16.
 * 消息推送
 */

public abstract class AbstractModel implements Serializable {


    @JsonProperty("create_time")
    protected Long createTime;
    @JsonProperty("update_time")
    protected Long updateTime;
    protected int enable;

    public void onCreate() {
        this.createTime = System.currentTimeMillis();
        this.updateTime = this.createTime;
    }

    public void onUpdate() {

        this.updateTime = System.currentTimeMillis();
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public Long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
    }

    public int getEnable() {
        return enable;
    }

    public void setEnable(int enable) {
        this.enable = enable;
    }
}
